const dataList = [{prop: 'xxx', count:20}, {prop: 'xxx', count:30},{prop: 'xxx', count:40}]
const A = 1000;

/**
 * A: Total amount of money
 * B: Money remaining = A - C
 * C: Selected amount of money for reimbursement = sum(b)
 * b: = count <= B ? count : B
 */


let C = selectedList.reduce((prev, cur) => {
    return prev + cur.count;
}, 0)
console.log(t)